{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Python期中总结"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 基础"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "python_base={\n",
    "    \"对python的理解\":{\n",
    "        \"掌握程度\":\"操作,100（80）\",\"意义,100（90）\",\n",
    "        \"python的优点\":\"代码量少且简介，可移植性强，开发效率高，可嵌入性，可扩展性\",\n",
    "        \"python的缺点\":\"运行速度较慢，不可加密\",\n",
    "        }\n",
    "    \n",
    "    \"ide(集成开发环境)\":{\n",
    "        \"idle\":[\"操作,100(90)\",\"意义,100（90）\"], \n",
    "        \"jupyter notebook\":[\"基础页面操作,100（95）\",\"Markdown语法编写,100(90)\",\"快捷键使用,100(70)\"],\n",
    "        \"pycharm\":[\"基础的代码编写，保存，页面操作基础设置,100（90）\", \"pycharm的快捷键使用,100（80）\"],\n",
    "        }\n",
    "}"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 第一课时"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "python_lesson1_knowledge_point={\n",
    "    \"if 语句\":{[\"操作,100（90）\", \"意义,100(100)\"] ,\n",
    "        # if xxxxx :\n",
    "        # elif xxxxx:\n",
    "        # else:\n",
    "    },\n",
    "    \n",
    "    \"for循环以及range内置函数\":{\n",
    "        \"for循环\":[\"操作,100（95）\",\"意义,100（100）\"],\n",
    "        \"range内置函数\":[\"range(stop),操作,100(95),意义,100(100)\",\n",
    "                        \"range(start,stop,step),操作,100(95),意义,100(100)\"],\n",
    "        # a=[1,2,3]\n",
    "        # for b in a:\n",
    "        # print(b)\n",
    "        # 1 2 3\n",
    "        # start: 计数从 start 开始。默认是从 0 开始。例如range（5）等价于range（0， 5）;\n",
    "        # stop: 计数到 stop 结束，但不包括 stop。例如：range（0， 5） 是[0, 1, 2, 3, 4]没有5\n",
    "        # step：步长，默认为1。例如：range（0， 5） 等价于 range(0, 5, 1)\n",
    "        \"for循环与range结合\":[\"操作,100（90）\",\"意义,100（100）\"],\n",
    "        # 从1加到10\n",
    "        # sum=0\n",
    "        # for a in range(1,11):\n",
    "        # sum+=a\n",
    "        # print(sum)\n",
    "        # 55\n",
    "        ## for a in range(5)\n",
    "        ## print('1'\n",
    "        ## 1 1 1 1 1\n",
    "    },\n",
    "    \n",
    "    \"random函数学习\":{\n",
    "       \"random.random()\":[\"操作,100（95）\",\"意义,100（100）\"],\n",
    "        # 随机生成一个大于0小于1的随机数。\n",
    "        #import random\n",
    "        # a=random.random()\n",
    "        # print(a)\n",
    "        # 0.40116812970725435\n",
    "       \"random.uniform(a,b)\": [\"操作,100(95)\",\"意义,100(100)\"],\n",
    "        # 用于生成一个指定范围内的随机浮点数，两个参数其中一个是下限一个是上限。（a<b）\n",
    "        # import random\n",
    "        # a=random.uniform(1,2)\n",
    "        # print(a)\n",
    "        # 1.6743756738162934\n",
    "        \"random.randint(a,b\"): [\"操作,100(95)\",\"意义,100(100)\"],\n",
    "        # 用于生成一个指定范围内的整数，（a<=N<=b）\n",
    "        # import random\n",
    "        # a=random.randint(1,2)\n",
    "        # print(a)\n",
    "        # 1 or 2\n",
    "        \"random.randrange([start], stop[, step])\": [\"操作,100(95)\",\"意义,100(100)\"],\n",
    "        # 从指定范围内，按指定的基数递增的集合中获取一个随机数\n",
    "        #  # import random\n",
    "        # a=random.randrange(0,10,2)\n",
    "        # print(a)\n",
    "        # 0 or 2 or 4 or 6 or 8\n",
    "        \"random.choice(sequence)\": [\"操作,100(95)\",\"意义,100(100)\"],\n",
    "        # 参数sequence表示一个有序类型，从序列中获取一个随机元素\n",
    "        # import random\n",
    "        # a=random.choice('123abc')\n",
    "        # print(a)\n",
    "        # 1 or 2 or 3 or a or b or c\n",
    "        \"random.shuffle(x[, random])\": [\"操作,100(0)\",\"意义,100(50)\"], \n",
    "        # 没有练习过该方法\n",
    "        # 用于将一个列表中的元素打乱，即将列表内的元素随机排列。\n",
    "        \"random.sample(sequence, k)\": [\"操作,100(0)\",\"意义,100(50)\"], \n",
    "        # 没有练习过该方法\n",
    "        # 从指定的序列中随机获取指定长度的片断并随机排列，sample函数不会修改原有序列\n",
    "    }\n",
    "}"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 第二、三课时"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "python_lesson2,3_knowledge_point={\n",
    "    \"字符串\":{\n",
    "        \"字符串的合并\":[\"操作,100(80)\",\"意义,100(90)\"],\n",
    "        \".join()\":[\"操作,100(80)\",\"意义,100(90)\"],\n",
    "        # 用于字符串的拼接\n",
    "        # a='123'\n",
    "        # b=''.join(a)\n",
    "        # print(b)\n",
    "        # 123\n",
    "        \"str.split（）\":[\"操作,100(80)\",\"意义,100(90)\"],\n",
    "        # 用于对字符串进行拆分\n",
    "        # a='1,2,3'\n",
    "        # b=a.split(',')\n",
    "        # print(b)\n",
    "        # ['1','2','3']\n",
    "        \"str.count()\":[\"操作,100(85)\",\"意义,100(90)\"],\n",
    "        # 计算字符串某个数值出现的次数\n",
    "        # a='1,2,3,1'\n",
    "        # print(a.count('1'))\n",
    "        # 2\n",
    "        \"str.isdigit\":[\"操作,100(90)\",\"意义,100(95)\"],\n",
    "        # 如果字符串只包含数字则返回 True，否则返回 False。\n",
    "        # a='123'\n",
    "        # print(a.isdigit)\n",
    "        # True\n",
    "    },\n",
    "    \n",
    "    \"列表\":{\n",
    "        \"列表切片\":\"list[start,end,step]\",\"操作,100(85)\",\"意义,100(90)\",\n",
    "         # 认识了解切片从0开始索引，并且无初始值默认从列表开头开始，无终止值会从指定初始的元素值运行到列表末尾的所有元素\n",
    "         # a=['1','2','3']\n",
    "         # b=a[:1:-1]\n",
    "         # b\n",
    "         # ['3']\n",
    "        \"列表函数\":{\n",
    "            \"len(list)\":[\"操作,100(85)\",\"意义,100(95)\"],\n",
    "             # 列表元素个数\n",
    "             # a=['1','2','3']\n",
    "             # len(a)\n",
    "             # 3\n",
    "            \"max(list)\":[\"操作,100(90)\",\"意义,100(95)\"],\n",
    "            # 返回列表元素最大值\n",
    "            # a=['1','2','3']\n",
    "            # max(a)\n",
    "            # 3\n",
    "            \"min(list)\":[\"操作,100(90)\",\"意义,100(95)\"],\n",
    "            # 返回列表元素最小值\n",
    "            # a=['1','2','3']\n",
    "            # min(a)\n",
    "            # 1\n",
    "            \"list(seq)\":[\"操作,100(75)\",\"意义,100(90)\"],\n",
    "            # 将元组转换为列表\n",
    "            # a=('1','2','3')\n",
    "            # print(list(a))\n",
    "            # ['1','2','3']\n",
    "         },\n",
    "        \"列表方法\":{\n",
    "            \"list.append(obj)\":[\"操作,100(90)\",\"意义,100(95)\"],\n",
    "            # 在列表末尾添加新的对象\n",
    "            # a=['1','2']\n",
    "            # a.append('3')\n",
    "            # a\n",
    "            # ['1','2','3']\n",
    "            \"list.extend(obj)\":[\"操作,100(80)\",\"意义,100(90)\"],\n",
    "            # 在列表末尾一次性追加另一个序列中的多个值（用新列表扩展原来的列表）\n",
    "            # a=['1']\n",
    "            # a.extend('23')\n",
    "            # a\n",
    "            # a=['1','2','3']\n",
    "            \"list.count(obj)\":[\"操作,100(95)\",\"意义,100(100)\"],\n",
    "            # 统计某个元素在列表中出现的次数\n",
    "            # a=[1,2,3]\n",
    "            # list.count(1)\n",
    "            # 1\n",
    "            \"list.insert(index,obj)\":[\"操作,100(90)\",\"意义,100(90)\"],\n",
    "            # 将对象插入列表\n",
    "            # a=[2,3]\n",
    "            # a.insert(0,1)\n",
    "            # a=[1,2,3]\n",
    "            \"list.index(obj)\":[\"操作,100(90)\",\"意义,100(90)\"],\n",
    "            # 从列表中找出某个值第一个匹配项的索引位置\n",
    "            # a=[1,2,3]\n",
    "            # a.index(1)\n",
    "            # 0\n",
    "            \"list.pop()\":[\"操作,100(90)\",\"意义,100(90)\"],\n",
    "            # 移除列表中的一个元素（默认最后一个元素），并且返回该元素的值\n",
    "            # a=[1,2,3]\n",
    "            # a.pop(0)\n",
    "            # a\n",
    "            # [1,2]\n",
    "            \"list.remove(obj)\":[\"操作,100(80)\",\"意义,100(90)\"],\n",
    "            # 移除列表中某个值的第一个匹配项\n",
    "            # a=[1,2,3]\n",
    "            # a.remove(1)\n",
    "            # a\n",
    "            # [2,3]\n",
    "            \"list.reverse()\":[\"操作,100(85)\",\"意义,100(95)\"],\n",
    "            # 反向列表中元素\n",
    "            # a=[1,2,3]\n",
    "            # a.reverse\n",
    "            # [3,2,1\n",
    "            \"list.clear()\":[\"操作,100(85)\",\"意义,100(95)\"],\n",
    "            # 保留列表名称，清空里面的值\n",
    "            # a=[1,2,3]\n",
    "            # a.clear()\n",
    "            # a\n",
    "            # []\n",
    "            \"list.copy()\":[\"操作,100(85)\",\"意义,100(90)\"],\n",
    "            # 复制列表\n",
    "            # a=[1,2,3]\n",
    "            # b=a.copy()\n",
    "            # b\n",
    "            # [1,2,3]\n",
    "            \"list.sort\":[\"操作,100(80)\",\"意义,100(90)\"],\n",
    "            # 对原列表进行排序\n",
    "            # a=[2,3,1]\n",
    "            # a.sort()\n",
    "            # a\n",
    "            # [1,2,3]\n",
    "         }\n",
    "    },\n",
    "        \n",
    "    # 字典是另一种可变容器模型，且可存储任意类型对象。字典的每个键值 key=>value 对用冒号 : 分割，每个对之间用逗号(,)分割，整个字典包括在花括号 {} 中。\n",
    "    # \"字典的特性\":\"字典值可以是任何的 python 对象，既可以是标准的对象，也可以是用户定义的，但键不行。两个重要的点需要记住： 1.不允许同一个键出现两次。创建时如果同一个键被赋值两次，后一个值会被记住。2.键必须不可变，所以可以用数字，字符串或元组充当，而用列表就不行。\"\n",
    "    \"字典\":{\n",
    "        \"对字典的键和键值的理解\":\"100(100)\",\n",
    "        \"访问字典里的值\":[\"操作,100(95)\",\"意义,100(98)\"],\n",
    "        # dict={'me':hzx}\n",
    "        # dict['me']\n",
    "        # hzx\n",
    "        \"修改字典的值\":[\"操作,100(95)\",\"意义,100(98)\"],\n",
    "        # dict1={'me':hhh}\n",
    "        # dict1['me']=hzx\n",
    "        # dict1\n",
    "        # hzx\n",
    "        \"删除字典元素\":[\"操作,100(95)\",\"意义,100(98)\"],\n",
    "        # dict1={'me':1}\n",
    "        # del dict1\n",
    "        # dict1={}\n",
    "        \"字典的内置函数\":{\n",
    "            \"len(dict)\":[\"操作,100(95)\",\"意义,100(98)\"],\n",
    "            # 计算字典元素个数，即键的总数。\n",
    "            # dict1={'1','2','3'}\n",
    "            # len(dict1)\n",
    "            # 3\n",
    "            \"str(dict)\":[\"操作,100(95)\",\"意义,100(98)\"],\n",
    "            # 输出字典可打印的字符串表示。\n",
    "            # dict1={'1','2','3'}\n",
    "            # str=str(dict1)\n",
    "            # '{'1','2','3'}'\n",
    "            },\n",
    "        \"字典的内置方法\":{\n",
    "            \"dict.clear()\":[\"操作,100(95)\",\"意义,100(98)\"],\n",
    "            # 删除字典内所有元素\n",
    "            # score={'语文':95,'数学':90}\n",
    "            # score.clear()\n",
    "            # print(score)\n",
    "            # 输出结果{}\n",
    "            \"dict.copy()\":[\"操作,100(95)\",\"意义,100(98)\"],\n",
    "            # 返回一个字典的浅复制\n",
    "            # a={'语文':95,'数学':90}\n",
    "            # dict.copy(a)\n",
    "            # dict\n",
    "            # {'语文':95,'数学':90}\n",
    "            \"dict.get(key, default=None)\":[\"操作,100(80)\",\"意义,100(90)\"],\n",
    "            # 返回指定键的值，如果值不在字典中返回default值\n",
    "            # score={'语文':95,'数学':90}\n",
    "            # score['语文']\n",
    "            # 95\n",
    "            # score['python']\n",
    "            # default\n",
    "            \"dict.items()\":[\"操作,100(85)\",\"意义,100(95)\"],\n",
    "            # 以列表返回可遍历的(键, 值) 元组数组\n",
    "            # score={'语文':95,'数学':90}\n",
    "            # score.items()\n",
    "            # '语文':95,'数学':90\n",
    "            \"dict.keys()\":[\"操作,100(90)\",\"意义,100(90)\"],\n",
    "            # 以列表返回一个字典所有的键\n",
    "            # score={'语文':95,'数学':90}\n",
    "            # score.keys()\n",
    "            # dict_keys(['语文', '数学'])\n",
    "            \"dict.setdefault(key, default=None)\":[\"操作,100(90)\",\"意义,100(90)\"],\n",
    "            # 和get()类似, 但如果键不存在于字典中，将会添加键并将值设为default\n",
    "            # score={}\n",
    "            # score.setdefault['语文']=95\n",
    "            # score.setdefault['数学']=90\n",
    "            # score\n",
    "            # score={'语文':95,'数学':90}\n",
    "            \"dict.values()\":[\"操作,100(90)\",\"意义,100(90)\"],\n",
    "            # 以列表返回字典中的所有值\n",
    "            # score={'语文':95,'数学':90}\n",
    "            # score.values()\n",
    "            # dict_values([95,90])\n",
    "            \"dict.update(dict2)\":[\"操作,100(85)\",\"意义,100(95)\"],\n",
    "            # 把字典dict2的键/值对更新到dict里\n",
    "            # score={\"语文\":95}\n",
    "            # score2={'数学':90}\n",
    "            # score.update(score2)\n",
    "            # print(score)\n",
    "            \"pop(key[,default])\":[\"操作,100(80)\",\"意义,100(90)\"],\n",
    "            # 删除字典给定键 key 所对应的值，返回值为被删除的值。key值必须给出。 否则，返回default值。\n",
    "            # score={'语文':95,'数学':90}\n",
    "            # score.pop('数学')\n",
    "            # print(score)\n",
    "            # {'语文':95}\n",
    "            # score={'语文':95}\n",
    "            \"popitem()\":[\"操作,100(80)\",\"意义,100(90)\"],\n",
    "            # 返回并删除字典中的最后一对键和值。\n",
    "            # score={'语文':95,'数学':90}\n",
    "            # score.popitem()\n",
    "            # print(score)\n",
    "            # {'语文':95}\n",
    "            # score={'语文':95}\n",
    "         }\n",
    "    },\n",
    "        \n",
    "    # \"集合\":\"集合（set）是一个无序的不重复元素序列。可以使用大括号 { } 或者 set() 函数创建集合，注意：创建一个空集合必须用 set() 而不是 { }，因为 { } 是用来创建一个空字典。\"\n",
    "    \"集合\":{\n",
    "        \"集合的方法\":{\n",
    "            \"set.add()\":[\"操作,100(90)\",\"意义,100(95)\"],\n",
    "            # 为集合添加元素\n",
    "            # set1 = {1, 2, 3}\n",
    "            # set1.add((1, 2))\n",
    "            # print(set1)\n",
    "            # 输出结果{(1, 2), 1, 2, 3}\n",
    "            \"set.clear()\":[\"操作,100(85)\",\"意义,100(90)\"],\n",
    "            # 移除集合中的所有元素\n",
    "            # set1 = {1,2,3}\n",
    "            # set1.clear()\n",
    "            # print(set1)\n",
    "            #输出结果set()\n",
    "            \"set.copy()\":[\"操作,100(95)\",\"意义,100(98)\"],\n",
    "            # 拷贝一个集合\n",
    "            # set1 = {1,2,3}\n",
    "            # set1.clear()\n",
    "            # print(set1)\n",
    "            #输出结果set()\n",
    "            \"set.difference()\":[\"操作,100(90)\",\"意义,100(95)\"],\n",
    "            # 返回多个集合的差集\n",
    "            # set1 = {1,2,3}\n",
    "            # set2 = {3,4}\n",
    "            # set3 = set1.difference(set2)\n",
    "            # print(set3)\n",
    "            # 输出结果皆为{1, 2}\n",
    "            \"set.discard()\":[\"操作,100(90)\",\"意义,100(95)\"],\n",
    "            # \t删除集合中指定的元素\n",
    "            # set1 = {1,2,3}\n",
    "            # set1.discard(2)\n",
    "            # print(set1)\n",
    "            # #输出结果{1, 3}\n",
    "            \"set.intersection()\":[\"操作,100(80)\",\"意义,100(80)\"],\n",
    "            # 返回集合的交集\n",
    "            # set1 = {1,2,3}\n",
    "            # set2 = {3,4}\n",
    "            # set3 = set1.intersection(set2)\n",
    "            # print(set3)\n",
    "            # 最后输出结果皆为{3}\n",
    "            \"set.isdisjoint()\":[\"操作,100(80)\",\"意义,100(80)\"],\n",
    "            # 判断两个集合是否包含相同的元素，如果没有返回 True，否则返回 False。\n",
    "            # set1 = {1,2,3}\n",
    "            # set2 = {3,4}\n",
    "            # print(set1.isdisjoint(set2))\n",
    "            # False\n",
    "            \"set.pop()\":[\"操作,100(90)\",\"意义,100(98)\"],\n",
    "            # 随机移除元素(默认是最后一个元素)\n",
    "            # set1 = {1,2,3}\n",
    "            # a = set1.pop()\n",
    "            # print(set1)\n",
    "            # #{2,3}\n",
    "            # print(a)\n",
    "            # 1\n",
    "            \"set.symmetric_difference()\":[\"操作,100(80)\",\"意义,100(80)\"],\n",
    "            # 返回两个集合中不重复的元素集合。\n",
    "            # set1 = {1,2,3}\n",
    "            # set2 = {3,4}\n",
    "            # set3 = set1.symmetric_difference(set2)\n",
    "            # print(set3)\n",
    "            # {1, 2, 4}\n",
    "            \"set.union()\":[\"操作,100(80)\",\"意义,100(80)\"],\n",
    "            # 返回两个集合的并集\n",
    "            # set1 = {1,2,3}\n",
    "            # set2 = {3,4}\n",
    "            # set3=set1.union(set2)\n",
    "            # print(set3)\n",
    "            # {1, 2, 3, 4}\n",
    "        }\n",
    "    }\n",
    "}"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 第四课时"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "python_lesson4_knowledge_point={\n",
    "    \"函数的初步学习\":{\n",
    "        \"函数关键字def return\":[\"操作,100(80)\",\"意义,100(90)\"],\n",
    "        \"函数两种添加注释方法\":[\"操作,100(90)\",\"意义,100(90)\"],\n",
    "        # 方法一’‘’str‘’‘  方法二 #\n",
    "        \"函数的*args用法\":[\"操作,100(80)\",\"意义,100(90)\"],\n",
    "        # 传入多个参数，转化成元组\n",
    "        \"函数的**kwargs用法\":[\"操作,100(80)\",\"意义,100(90)\"],\n",
    "        # 把关键字参数，转化成字典\n",
    "        \"函数的调用 import\":[\"操作,100(95)\",\"意义,100(100)\"],\n",
    "        \"函数的as用法\":[\"操作,100(90)\",\"意义,100(100)\"],\n",
    "        \"从模块中导入函数\":[\"操作,100(80)\",\"意义,100(90)\"],\n",
    "    }\n",
    "}"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.3"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
